package br.ucb.cm.main.common;

public class GeneralConstants {
	public static final int DEFAULT_SQUARE_DIMENSION = 80;
	public static final int DEFAULT_PIECE_DIMENSION = 60;
	public static final int DEFAULT_THUMB_SQUARE_DIMENSION = 20;
	public static final int DARK = 0;
	public static final int LIGHT = 1;
	public static final int MIN_COLUMNS = 2;
	public static final int MIN_ROWS = 2;
	public static final int MAX_DIFFICULTY = 5;
	
	public static enum PlayerTypeEnum{
		HUMAN, CPU;
		
		public static PlayerTypeEnum getByOrdinal(int num){
			for (PlayerTypeEnum playerTypeEnum : values())
				if (playerTypeEnum.ordinal() == num)
					return playerTypeEnum;
			
			return null;
		}
	}
	
	public static enum PlayerEnum{
		PLAYER_ONE, PLAYER_TWO;
		private PlayerTypeEnum playerType;
		private String name;

		public static PlayerEnum getByOrdinal(int num){
			for (PlayerEnum playerEnum : values())
				if (playerEnum.ordinal() == num)
					return playerEnum;
			
			return null;
		}
		
		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public PlayerTypeEnum getPlayerType() {
			return playerType;
		}

		public void setPlayerType(PlayerTypeEnum playerType) {
			this.playerType = playerType;
		}
	}
	
}
